package LeetCode;

public class LC_201_BitwiseANDofNumbersRange {

    public static void main(String[] args) {

    }

    static class Solution {
        public int rangeBitwiseAnd(int m, int n) {
            int bit = 0;
            while (m != n) {
                m >>= 1;
                n >>= 1;
                bit++;
            }
            return m << bit;
        }
    }

}